package main

import "fmt"

func printType(val interface{}) {
	switch v := val.(type) {
	case int:
		fmt.Println("Integer类型:", v)
	case string:
		fmt.Println("String（字符类型）:", v)
	case float64:
		fmt.Println("Float（浮点数）:", v)
	default:
		fmt.Println("Unknown type")
	}
}

func main() {
	printType(42)
	printType("hello")
	printType(3.14)
	printType([]int{1, 2, 3})
}
